import request from './http.js'
let baseUrl='https://openapi.sandpay.com.cn';//请求地址 
export function sdCashier(data,uri) {
  let url = baseUrl + (uri ? uri : '/v4/sd-cashier/api/trans/cashier.order.create');
  return request({
    url,
    method: 'POST',
    data
  })
}
export function onekeyAccess(data,uri) {
  let url = baseUrl + (uri ? uri : '/v4/sd-wallet/api/m-wallet/account.onekey.access');
  return request({
    url, 
    method: 'POST',
    data
  })
}
// TODO 此处加密方法为商户自己后端提供的加密方法，解密方法也是
export function signEncrypt(data) {
  return request({ 
	// url:"http://172.28.244.35:10229/sandpay.sign.encrypt.msg" ,
    url: 'https://cap.sandpay.com.cn/products/experience/sandpay.sign.encrypt.msg',
    method: 'POST',
    data
  })
}
// TODO 此处加密方法为商户自己后端提供的加密方法，解密方法也是
export function signDecrypt(data) {
  return request({
	// url: 'http://172.28.244.35:10229/sandpay.verify.sign.decrypt.msg',
    url: 'https://cap.sandpay.com.cn/products/experience/sandpay.verify.sign.decrypt.msg',
    method: 'POST',
    data
  })
}
